﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.OleDb;

public partial class NePostoi : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {

            String conString = ConfigurationManager.ConnectionStrings["link1"].ConnectionString;

            OleDbConnection conn = new OleDbConnection(conString);

            conn.Open();

            string insert = "insert into KupeniGradovi values (?,?,?)";


            OleDbCommand cmd = new OleDbCommand(insert, conn);


            cmd.Parameters.AddWithValue("?", Convert.ToInt32(TextBox1.Text));
            cmd.Parameters.AddWithValue("?", TextBox2.Text);
            cmd.Parameters.AddWithValue("?", TextBox3.Text);


            int i = cmd.ExecuteNonQuery();
            Label1.Text = i.ToString();

            conn.Close();

            Response.Redirect("MeniClient.aspx");

        }

 }
    
